export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'code-edu 在线教育网站',
    htmlAttrs: {
      lang: 'zh-CN'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    // 'swiper/dist/css/swiper.css',
    'element-ui/lib/theme-chalk/index.css',
    '@/assets/css/main.less',
    'ant-design-vue/dist/antd.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/element-ui',
    '@/plugins/ant-design-ui',
    { src: '@/plugins/nuxt-swiper-plugin.js', mode: 'client' },
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    '@nuxtjs/style-resources',
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/],
  },
  styleResources: {
    less: ['@/assets/css/main.less']
  },

  env: {
    //baseUrl: 'http://localhost:4523/mock/373836', //TODO 开发用的本地mock
    // baseUrl: 'http://106.15.109.151:8222', //TODO 后台测试,
    baseUrl: 'http://localhost:8222',
    // baseUrl: 'http://cn.utools.club:33969', //TODO 远程连接测试,
  }
}
